package com.hxl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hxl.entity.CmfzAdmin;
import com.hxl.mapper.CmfzAdminMapper;
import com.hxl.service.CmfzAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * InnoDB free: 10240 kB 服务实现类
 * </p>
 *
 * @author hxl
 * @since 2020-08-18
 */
@Service
public class CmfzAdminServiceImpl extends ServiceImpl<CmfzAdminMapper, CmfzAdmin> implements CmfzAdminService {
    @Autowired
    private CmfzAdminMapper cmfzAdminMapper;
    @Override
    public CmfzAdmin login(String username, String password) {
        QueryWrapper<CmfzAdmin> wrapper = new QueryWrapper<>();
        wrapper.eq("username",username);
        wrapper.eq("password",password);
        CmfzAdmin cmfzAdmin = cmfzAdminMapper.selectOne(wrapper);
        return cmfzAdmin;
    }
}
